package cn.com.huzo.model.entities.manufacture;

import huzofw.model.entities.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.sql.Timestamp;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 生产跟单完工明细记录实体类
 * <p>
 * @author 范学春
 */
public class PmsLinesWorkDoneEntity extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 2644505422417516141L;
    private String LinesId;
    private Long HeaderId;                // 所属生产跟单表ID
    private String PprocessMemoLinesId;   // 所属明细子表ID 
    private Timestamp StartDate;          // 跟踪起始日期
    private Timestamp EndDate;            // 跟踪结束日期
    private Integer PlanQuantity;
    private Integer RealQuantity;

    public String getLinesId() {
        return LinesId;
    }

    public void setLinesId(String LinesId) {
        this.LinesId = LinesId;
    }

    public Long getHeaderId() {
        return HeaderId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public String getPprocessMemoLinesId() {
        return PprocessMemoLinesId;
    }

    public void setPprocessMemoLinesId(String PprocessMemoLinesId) {
        this.PprocessMemoLinesId = PprocessMemoLinesId;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getStartDate() {
        return StartDate;
    }

    public void setStartDate(Timestamp StartDate) {
        this.StartDate = StartDate;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getEndDate() {
        return EndDate;
    }

    public void setEndDate(Timestamp EndDate) {
        this.EndDate = EndDate;
    }

    public Integer getPlanQuantity() {
        return PlanQuantity;
    }

    public void setPlanQuantity(Integer PlanQuantity) {
        this.PlanQuantity = PlanQuantity;
    }

    public Integer getRealQuantity() {
        return RealQuantity;
    }

    public void setRealQuantity(Integer RealQuantity) {
        this.RealQuantity = RealQuantity;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof PmsLinesWorkDoneEntity)) {
            return false;
        }

        final PmsLinesWorkDoneEntity that = (PmsLinesWorkDoneEntity) o;

        return new EqualsBuilder()
            .append(this.getLinesId(), that.getLinesId())
            .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getLinesId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
